package com.x.erp.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.x.erp.model.Color;
import com.x.erp.rpc.ColorRpcService;
import com.x.framework.controller.BaseController;
import com.x.framework.controller.ResultCode;
import com.x.framework.controller.ResultModel;

@RestController
public class ColorController extends BaseController{

	@Reference
	private ColorRpcService colorRpcService;

	/**
	 * 获取颜色列表
	 * 
	 * @param color
	 * @return
	 */
	@RequestMapping(value = "/getColorList", method = { RequestMethod.POST, RequestMethod.GET })
	public ResultModel selectColorList(Color color) {
		return new ResultModel(ResultCode.RESULT_SUCCESS, "查询成功", colorRpcService.selectColorList(color));
	}

}
